extends Node2D


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	if Input.is_key_pressed(KEY_Q):
		print("按下Q键")
	
	if Input.is_action_just_pressed("跳跃"):
		print("刚按下了跳跃")
	elif Input.is_action_just_released("跳跃"):
		print("刚抬起了跳跃")
	elif Input.is_action_pressed("跳跃"):
		print("按着跳跃")
	var length: float = Input.get_action_strength("跳跃")
	# 水平移动值
	var horizontal: float = Input.get_axis("左", "右")

	var move: Vector2 = Input.get_vector("左", "右", "上", "下")
	print("跳跃的强度：", length, "|水平移动值：", horizontal, "|2D移动向量：", move)
	pass
